“reference code”常指参考代码/示例代码:用于对照、学习或作为实现某功能的参考范例的代码。(在某些场景也可指“参考编号/引用代码”,即用于检索或标识的代码。)
/ˈrɛfərəns koʊd/
I used the reference code to learn how the function works.
我用参考代码来学习这个函数是如何工作的。
Before we rewrite the module, we compare our implementation with the reference code to make sure the outputs match under edge cases.
在重写这个模块之前,我们会把自己的实现与参考代码进行对比,确保在边界情况下面输出一致。
“reference”来自拉丁语 referre(带回、提及、指向),引申为“供查阅/对照的资料”;“code”来自拉丁语 codex(书册、法典)并发展为“编码/代码”。合起来,“reference code”就是“用于对照与查阅的代码”。